const initVal = { token: '', refresh_token: '' }
function login(preState = initVal, action) {
  const { type, payload } = action
  switch (type) {
    case 'login/token':
      return { ...payload } // 返回token和刷新的token
    case 'logout':
      return { token: '', refresh_token: '' }
    default:
      return preState
  }
}
export default login
